package com.example.demo1.itlianxi06;

import java.util.Scanner;

public class Strfanzhuan {
    public Strfanzhuan() {
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String line = sc.nextLine();
        System.out.println(reveal(line));
    }

    public static String reveal(String s) {
        String ss = "";

        for(int i = s.length() - 1; i >= 0; --i) {
            ss = ss + s.charAt(i);
        }

        return ss;
    }
}
